package com.xpec.c4.h5net;

import static org.junit.Assert.assertTrue;

import java.io.UnsupportedEncodingException;

import org.junit.Test;

public class H5XSENetTGWHandlerTest {

	@Test
	public void testBytesIndexOf() throws UnsupportedEncodingException 
	{
		H5XSENetTGWHandler h = new H5XSENetTGWHandler();
		
		int l = 0;
		
		String str = new String("\r\nHost:\r\n\r\n");
		
		/*
		l = 
		h.bytesIndexOf(
						str.getBytes("US-ASCII"),
						new String("tgw_l7_forward").getBytes("US-ASCII")
					);
		*/
		
		l = 
		h.bytesIndexOf(
						str.getBytes("US-ASCII"),
						new String("\r\n\r\n").getBytes("US-ASCII")
					);
		
		assertTrue(l != -1);
	}

}
